{% load static %}
{% load i18n static simpletags %}
<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- 上述meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <!-- Bootstrap CSS -->
    <link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
    <!-- <link href="{% static 'login/css/register.css' %}" rel="stylesheet"/> -->
    <title>注册</title>
    {% block icon %}
    {#        <link rel="icon" href="{% static '/admin/simpleui-x/img/favicon.png' %}">#}
        {% endblock %}
    
        {% include 'admin/includes/css-part.html' %}
    
        {% block css %}
            <link rel="stylesheet" href="{% static '/admin/simpleui-x/css/login.css' %}?_=2.1">
        {% endblock %}
        {% block bg %}
            <style type="text/css">
                .bg {
                    background: #f0f2f5;
                    background-image: url('{% static '/admin/simpleui-x/img/bg.svg' %}');
                    min-height: 100%;
                    background-repeat: no-repeat;
                    background-position: 50%;
                    background-size: 100%;
                    padding: 20px 0;
                    position: relative;
                }
            </style>
        {% endblock %}
  </head>
  <body>
    <div class="login-main">
      {% block logo %}
          <div class="logo">
              {% if "SIMPLEUI_LOGO"|get_config %}
                  <img src="{{ "SIMPLEUI_LOGO"|get_config |safe }}">
              {% else %}
                  <img src="{% static '/admin/simpleui-x/img/logo.png' %}">
              {% endif %}
          </div>
      {% endblock %}
  
      {% block header %}
          <div class="header">{{ site_header }}</div>
      {% endblock %}
    <div class="container">
            <div class="col">
                <form class="form-register" action="/register/" method="post">

                    {% if register_form.captcha.errors %}
                        <div class="alert alert-warning">{{ register_form.captcha.errors }}</div>
                    {% elif message %}
                        <div class="alert alert-warning">{{ message }}</div>
                    {% endif %}

                  {% csrf_token %}
                  <h3 class="text-center">欢迎注册</h3>

                  <div class="form-group">
                      {{ register_form.username.label_tag }}
                      {{ register_form.username}}
                  </div>
                  <div class="form-group">
                    {{ register_form.idcard.label_tag }}
                    {{ register_form.idcard}}
                </div>
                  <div class="form-group">
                      {{ register_form.password1.label_tag }}
                      {{ register_form.password1 }}
                  </div>
                  <div class="form-group">
                      {{ register_form.password2.label_tag }}
                      {{ register_form.password2 }}
                  </div>
                  <div class="form-group">
                      {{ register_form.email.label_tag }}
                      {{ register_form.email }}
                  </div>
                  <div class="form-group">
                      {{ register_form.sex.label_tag }}
                      {{ register_form.sex }}
                  </div>
                  <div>
                      <a href="/login/"  ><ins>直接登录</ins></a>
                      <button type="submit" class="btn btn-primary float-right">注册</button>
                  </div>
                </form>
            </div>
    </div> <!-- /container -->
  </div>
  {% include 'admin/includes/js-part.html' %}

  <script type="text/javascript" src="{% static '/admin/simpleui-x/js/login.js' %}?_=3.3"></script>
  
  {% block  particles %}
      {% if 'SIMPLEUI_LOGIN_PARTICLES'|get_config != False %}
          <!--
              Close login page particles see link:
              关闭登录页粒子动画请查看：
              https://github.com/newpanjing/simpleui/blob/master/QUICK.md#关闭登录页粒子动画
          -->
          <style type="text/css">
              #particles-js {
                  position: fixed;
                  top: 0px;
                  left: 0px;
                  right: 0px;
                  bottom: 0px;
                  z-index: -1;
              }
          </style>
          <!-- particles.js container -->
          <div id="particles-js"></div>
          <script type="text/javascript" src="{% static '/admin/simpleui-x/particles/particles.js' %}"></script>
          <script type="text/javascript" src="{% static '/admin/simpleui-x/particles/app.js' %}"></script>
      {% endif %}
  {% endblock %}
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    {#    以下三者的引用顺序是固定的#}
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
    <script src="https://cdn.bootcss.com/popper.js/1.15.0/umd/popper.js"></script>
    <script src="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>

  </body>
</html>